__author__ = "Ypf"
_date_ = "2019/7/29-11:30"
bussiness_cal_fields={
    'k3_jichu': {
        'cgfp_insert': "insert into k3_cgfp (pinpai,ggxh,yfkrq,ghdw,fph,shbz,bm,ywy,bb,hv,wldm,wlmc,dfkm,dw,sl,zhdwsl,wsdj,ddhsdj,slv,se,bhsje,yjcbfy,yfsj,jshj,gjzt,pzzh,jbdw,jbdwsl,ygjsl,ygjje,wgjsl,wgjje,bqgjsl,bqgjje,dddh,yddh,ydlx,wlcdm,cgfs,nlv,bhsjebwb,sebwb,jshjbwb,ywlx,hxbz,shrq,zkl,zke,zkebwb,sjhsdj,bjcbfybw,cydw,ph,jsfs,kprq,id,sjsj)"
                       "values ('%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s', '%s', '%s')",
        'yskmxb_insert': "insert into k3_yskmx(djrq,cwrq,djlx,djbh,mxlx,pzh,skfph,wlkm,zy,bm,ywy,bqys,bqss,qmye,id,sjsj)"
                         "values ('%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s')",
        'xsckd_insert': "insert into k3_xsckd(ckrq,skrq,shbz,ckdh,xsfs,ghdw,fhck,cpdm,cpcdm,cpmc,ggxh,dw,ph,sfsl,dwcb,cb,pzzh,gjzt,xsywlx,ygjsl,wgjsl,bqgjsl,dddh,yddh,ydlx,bm,ywy,zg,jhdz,shrq,kpsl,yfsl,jhdj,jhje,xsdj,xsje,sjhm,txm,khhth,xshth,khbm,pp,wsdj,wsje,slv,id,sjsj)"
                        "values ('%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s','%s','%s','%s','%s', '%s', '%s', '%s')",
        'xsdd_insert': "insert into k3_xsdd(pp,cpmc,shbz,gbbz,qdrq,ghdw,xsfs,jhfs,bh,dycs,gbrq,gbyy,bbh,gbr,bibie,jh,zg,bm,ywy,zd,jsfs,hlv,ggxh,dw,sl,zhdwsl,kcsl,wsdj,wsje,zklv,dwzke,zke,jbdw,jbdwsl,shr,jhrq,bz,cpcdm,hywgbbz,jyjhraq,dydm,dymc,jbdwcksl,yddh,ydlx,jsrq,aaa,shrq,fzsx,fzsxdm,hsdj,sjhsdj,sxse,jshj,hslv,zwlfhbb,yf,fpsjrdz,sjh,gsmc,nssbm,zcdz,dh,khyh,yhzh,xch,khbm,ms,sjxqjhrq,khhth,id,sjsj)"
                       "values ('%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s', '%s', '%s', '%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s', '%s', '%s', '%s')",
        'khry_insert': "insert into k3_khry(khmc,khjl,kf,xsjl,id,sjsj) "
                       "values ('%s','%s','%s','%s','%s','%s')",
        'skd_insert':"insert into k3_skd(zflx,zt,djh,djrq,cwrq,hsxmlb,khdm,kh,bmdm,bm,ywydm,ywy,djje,bb,shr,ydlx,yddh,dddh,jsssje,jszkje,pp,cpmc,ggxh,sl,hsdj,jssl,cpdm,jsfs,id,sjsj)"
                     "values('%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s','%s','%s', '%s', '%s', '%s')",
        'gysry_insert': "insert into k3_gysry(pp,cpjl,cpgly,id,sjsj) "
                        "values ('%s','%s','%s','%s','%s')",
        'cpgly_insert': "insert into k3_cpgly(gys,cpgly,id,sjsj) values('%s','%s','%s','%s')",
        'kh_insert':"insert into k3_kh (dm,mc,qm,dz,dh,cz,jsfs,zyywy,shr,fj,tp,id,sjsj)values('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
        "insert_check_sql":"  SELECT   DISTINCT sjsj from %s WHERE sjsj='%s'",
        "saomia_insert":"insert into k3wjsm(wjj,wjmc,sjsj,sftq,id)values ('%s','%s','%s','%s','%s')",
        "checkwj_sql":"select wjj,wjmc,sjsj,sftq FROM k3wjsm"
    },
    "k3_caozuo": {
        "xsckd_chtj_kh": "select  k3_xsckd.ghdw,k3_xsckd.ywy,k3_xsckd.ywy,SUM( CONVERT ( FLOAT, xsje ) ) FROM k3_xsckd WHERE k3_xsckd.sjsj = '%s'  GROUP BY k3_xsckd.ghdw,k3_xsckd.ywy,k3_xsckd.sjsj",
        "insert_chtj_kh": "insert into k3chtjkh(ghdw,khjl,kf,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s')",
        "xsckd_chtj_jl": " SELECT k3_xsckd.ywy,SUM( CONVERT ( FLOAT, xsje ) ) FROM k3_xsckd WHERE k3_xsckd.sjsj = '%s' GROUP BY k3_xsckd.ywy",
        "insert_chtj_jl": "insert into k3chtjjl(khjl,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s')",
        "xsckd_chtj_pp": "SELECT k3_xsckd.pp,k3_gysry.cpjl,k3_gysry.cpgly,SUM( CONVERT ( FLOAT, xsje )) FROM k3_xsckd 	,k3_gysry WHERE k3_xsckd.sjsj = '%s' and k3_gysry.pp = k3_xsckd.pp GROUP BY k3_xsckd.pp,k3_gysry.cpjl,k3_gysry.cpgly",
        "insert_chtj_pp": "insert into k3chtjcp(pp,cpjl,cpzl,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s')",
        "xsdd_ddtj_pp": "SELECT k3_xsdd.pp,k3_gysry.cpjl,k3_gysry.cpgly,SUM( CONVERT ( FLOAT, k3_xsdd.jshj)*CONVERT ( FLOAT, k3_xsdd.hlv) ) FROM k3_xsdd 	,k3_gysry WHERE k3_xsdd.sjsj = '%s' and k3_gysry.pp = k3_xsdd.pp GROUP BY k3_xsdd.pp,k3_gysry.cpjl,k3_gysry.cpgly",
        "insert_ddtj_pp": "insert into k3xstjcp(pp,cpjl,cpgly,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s')",
        "xsdd_ddtj_kh": "select  k3_xsdd.ghdw,k3_xsdd.ywy,k3_xsdd.zd,SUM( CONVERT ( FLOAT, k3_xsdd.jshj)*CONVERT ( FLOAT, k3_xsdd.hlv) ) FROM k3_xsdd WHERE k3_xsdd.sjsj = '%s' GROUP BY k3_xsdd.ghdw,k3_xsdd.ywy,k3_xsdd.zd",
        "insert_ddtj_kh": "insert into k3xstjkh(ghdw,khjl,kf,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s')",
        "xsdd_ddtj_xs": "select  k3_xsdd.ywy,k3_xsdd.zd,SUM( CONVERT ( FLOAT, k3_xsdd.jshj)*CONVERT ( FLOAT, k3_xsdd.hlv) ) FROM k3_xsdd WHERE k3_xsdd.sjsj = '%s' GROUP BY k3_xsdd.ywy,k3_xsdd.zd",
        "insert_ddtj_xs": "insert into k3xstjxs(khjl,kf,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s')",
        "cgdd_cgtj_gys": "SELECT gongys_name,SUM(CONVERT ( FLOAT, jiashui_heji )*CONVERT ( FLOAT, huilv )) FROM k3_caigoud  where sjsj='%s'  GROUP BY gongys_name",
        "insert_cgtj_gys": "insert into k3cgtjgy(gys,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s')",
        "cgdd_cgtj_pp": "SELECT brand,SUM(CONVERT ( FLOAT, jiashui_heji )*CONVERT ( FLOAT, huilv )) FROM k3_caigoud  where sjsj='%s'  GROUP BY brand",
        "insert_cgtj_pp": "insert into k3cgtjpp(pp,dyche,qngyche,dbqnzzl,sjsj,id)values ('%s','%s','%s','%s','%s','%s')",
        "check_sql":"  SELECT   DISTINCT sjsj from %s WHERE sjsj='%s-01' ",
        "insert_check_sql":"  SELECT   DISTINCT sjsj from %s WHERE sjsj='%s-01'",
        "chyc_1_sql":" select DISTINCT qdrq,ghdw,ywy,k3_khry.kf,bh,khhth,khbm,ggxh,pp,jhrq,sjhsdj,CONVERT ( FLOAT, sl )-CONVERT ( FLOAT, jbdwcksl ) as wchsl,kcsl	 from k3_xsdd,k3_khry  where  jhrq<(select convert(varchar(10),dateadd(month,-1,getdate()),23)) and gbbz!='Y'and CONVERT ( FLOAT, sl )-CONVERT ( FLOAT, jbdwcksl )>0 and k3_xsdd.ghdw=k3_khry.khmc",
        "chyc_3_sql":" select DISTINCT qdrq,ghdw,ywy,k3_khry.kf,bh,khhth,khbm,ggxh,pp,jhrq,sjhsdj,CONVERT ( FLOAT, sl )-CONVERT ( FLOAT, jbdwcksl ) as wchsl,kcsl from k3_xsdd,k3_khry  where  jhrq<(select convert(varchar(10),dateadd(month,-3,getdate()),23)) and CONVERT ( FLOAT, sl )-CONVERT ( FLOAT, jbdwcksl )>0 and gbbz!='Y' and k3_xsdd.ghdw=k3_khry.khmc",
        "insert_chyc": "insert into k3chycbj(qdrq,ghdw,khjl,xszl,fwhth,khhth,khlh,ggxh,pp,htjq,sjhsdj,wjhsl,kcsl,sjsj,id,cqys)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
        "ddyc_180_sql":"select DISTINCT ghdw ,ywy,ggxh,sl from  k3_xsdd ",
        "ddyc_sql":"select   ghdw  from k3_xsdd  where sjsj>(select convert(varchar(10),dateadd(month,-6,getdate()),23))",
        "insert_ddyc":"insert into k3ddycbj(khmc,khjl,dhxh,tcdhsl,sjsj,id,tcdhzq)values ('%s','%s','%s','%s','%s','%s','%s')",
        "skjllrhs_sql":" select DISTINCT  kh, k3_skd.dddh,ckrq,  (SELECT top 1 cjbjdh FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   ) and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh ORDER BY bjrq DESC) as cjbjdh ,k3_skd.pp,k3_skd.cpmc,k3_skd.ggxh,k3_skd.bb,k3_skd.jssl,k3_skd.hsdj,CONVERT(FLOAT,k3_skd.jsssje) as ssjr,(SELECT top 1 tcbl FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   ) and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh ORDER BY bjrq DESC) as jlbl,CONVERT ( FLOAT, (SELECT top 1 tcbl FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   ) and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh  ORDER BY bjrq DESC) / 100 ) * CONVERT ( FLOAT, k3_skd.jsssje ) AS jle,CONVERT ( FLOAT, (SELECT top 1 tcbl FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   )and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh  ORDER BY bjrq DESC) / 100 ) * CONVERT ( FLOAT, k3_skd.jsssje )*0.4 as scje ,CONVERT ( FLOAT, (SELECT top 1 tcbl FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   ) and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh  ORDER BY bjrq DESC) / 100 ) * CONVERT ( FLOAT, k3_skd.jsssje )*0.3 as scje1,CONVERT ( FLOAT, (SELECT top 1 tcbl FROM	quotationsu WHERE	quotationsu.cpdm in ( SELECT  id FROM product WHERE cpbm = k3_skd.cpdm   ) and (select khqc FROM account where id=quotationsu.khmc)=k3_skd.kh  ORDER BY bjrq DESC) / 100 ) * CONVERT ( FLOAT, k3_skd.jsssje )*0.3 as scje2,k3_skd.djrq,k3_skd.bm,k3_skd.ywy,k3_skd.jsfs,k3_xsckd.slv,k3_xsckd.dwcb,CONVERT(FLOAT,k3_xsckd.dwcb)*CONVERT(FLOAT,k3_skd.jssl) as cb,(CONVERT(FLOAT,k3_skd.jsssje)/((100+CONVERT(FLOAT,k3_xsckd.slv))/100))-cb from k3_skd,k3_xsckd where k3_skd.dddh=k3_xsckd.xshth and k3_skd.jssl=k3_xsckd.sfsl and k3_skd.kh!='' and k3_skd.sjsj='%s'",
        "insert_skjllrhs":"insert into 	k3skjllr (ghdw,hth,ckrq,xbjmxdh,pp,cpmc,ggxh,bz,sfsl,xsdj,ssje,jlbl,jle,scjj,scjj1,scjj2,lkrq,bm,ywy,jsfs,sl,dwcb,cb,bhsml,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
        "cpbfyhs_jd_sql":"select ISNULL((SELECT  第一季度 =sum(case when datepart(qq,zfsj)= 1 then yzfje end ) from feebill22 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill22.zfsj ) = 0),0)+ISNULL((SELECT  第一季度 =sum(case when datepart(qq,zfsj)= 1 then yzfje end ) from feebill2 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill2.zfsj ) = 0),0)+ISNULL((SELECT  第一季度 =sum(case when datepart(qq,zfsj)= 1 then yifje end ) from feebill222 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill222.zfsj ) = 0),0) as Q1,ISNULL((SELECT  第二季度 =sum(case when datepart(qq,zfsj)= 2 then yzfje end ) from feebill22 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill22.zfsj ) = 0),0)+ISNULL((SELECT  第二季度 =sum(case when datepart(qq,zfsj)= 2 then yzfje end ) from feebill2 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill2.zfsj ) = 0),0)+ISNULL((SELECT  第二季度 =sum(case when datepart(qq,zfsj)= 2 then yifje end ) from feebill222 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill222.zfsj ) = 0),0) as Q2,ISNULL((SELECT  第三季度 =sum(case when datepart(qq,zfsj)= 3 then yzfje end ) from feebill22 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill22.zfsj ) = 0),0)+ISNULL((SELECT  第三季度 =sum(case when datepart(qq,zfsj)= 3 then yzfje end ) from feebill2 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill2.zfsj ) = 0),0)+ISNULL((SELECT  第三季度 =sum(case when datepart(qq,zfsj)= 3 then yifje end ) from feebill222 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill222.zfsj ) = 0),0) as Q3,ISNULL((SELECT  第四季度 =sum(case when datepart(qq,zfsj)= 4 then yzfje end ) from feebill22 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill22.zfsj ) = 0),0)+ISNULL((SELECT  第四季度 =sum(case when datepart(qq,zfsj)= 4 then yzfje end ) from feebill2 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill2.zfsj ) = 0),0)+ISNULL((SELECT  第四季度 =sum(case when datepart(qq,zfsj)= 4 then yifje end ) from feebill222 WHERE idowner= (SELECT id from org_employee where sname='%s') and  DateDiff(year, GetDate(), feebill222.zfsj ) = 0),0) as Q4",
        "xsbfyhs_jd_sql":"select 第一季度 = ISNULL(sum(case when datepart(qq,ckrq)= 1 then CONVERT ( FLOAT, xsje) end ),0),第二季度 = ISNULL(sum(case when datepart(qq,ckrq)= 2 then CONVERT ( FLOAT, xsje) end ),0),第三季度 = ISNULL(sum(case when datepart(qq,ckrq)= 3 then CONVERT ( FLOAT, xsje) end ),0),第四季度 = ISNULL(sum(case when datepart(qq,ckrq)= 4 then CONVERT ( FLOAT, xsje) end ),0) from k3_xsckd where ywy='%s' and DateDiff(year, GetDate(), ckrq )=0",
        "xsbfyhs_jd_isnert":"insert into xsbrwfy(q1sjch,q2sjch,q3sjch,q4sjch,q1sjfy,q2sjfy,q3sjfy,q4sjfy,sjsj,id,ry,zw)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','客户经理')",
        "cpbch_jd_sql":"select 第一季度 = ISNULL(sum(case when datepart(qq,ckrq)= 1 then CONVERT ( FLOAT, xsje) end ),0),第二季度 = ISNULL(sum(case when datepart(qq,ckrq)= 2 then CONVERT ( FLOAT, xsje) end ),0),第三季度 = ISNULL(sum(case when datepart(qq,ckrq)= 3 then CONVERT ( FLOAT, xsje) end ),0),第四季度 = ISNULL(sum(case when datepart(qq,ckrq)= 4 then CONVERT ( FLOAT, xsje) end ),0) from k3_xsckd where  k3_xsckd.pp in (select k3_gysry.pp from k3_gysry  where cpjl='%s')  and ckrq like '%s'",
        "cpbfyhs_jd_isnert":"insert into cpbrwfy(q1sjch,q2sjch,q3sjch,q4sjch,q1sjfy,q2sjfy,q3sjfy,q4sjfy,sjsj,id,ry,zw)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','产品经理')",
        "zhmx_sql":"select  sname,sqbz,qcje, (select SUM(jine) from soukuan where 	zhbm=zhanghao and  riqi BETWEEN '%s'  and '%s') as sysr,(select SUM(zrjzje) from zjzy where 	zrzh=zhanghao and  	zrjzrq BETWEEN '%s'  and '%s' ) as syzr, (select SUM(fkje) from fukuan where 	hkzh=zhanghao and  riqi BETWEEN '%s'  and '%s') as syfk, ( SELECT SUM( sjzcje) FROM zjzy WHERE zczhao = zhanghao AND 	zcjzrq BETWEEN '%s' AND '%s'  ) AS syzc,(select SUM(yzfje) from feebill2 where zfzh1=zhanghao and  zfsj BETWEEN '%s'  and '%s') as glfy,(select SUM(yzfje) from feebill22 where zfzh1=zhanghao and  zfsj BETWEEN '%s'  and '%s') as khfy,(select SUM(yifje) from feebill222 where zfzh1=zhanghao and  zfsj BETWEEN '%s'  and '%s') as cpfy from feebill222z",
        "zhmx_insert":"insert into zjzhmx(zhmc,zhbz,cqye,yfsr,yfzr,	yffk,yfzc,glfy,khfy,cpfy,qmkcxj,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",
        "yjdh_sql":"select caigou_date,gongys_name,caigou_code,brand,wuliao_name,guige_xinhao,number,shui_rate,bibie,hanshui_unit,jiashui_heji,jiaohuo_date,yjdh_date,yewu_name FROM k3_caigoud  where yjdh_date  BETWEEN '%s' and '%s'",
        "yjdh_insert_sql":"insert into k3yjdh(cgrq,gys,djbh,pp,wlmc,ggxh,sl,bb,slv,hsdj,jshj,jqrq,yjdhsj,yjdhsj,sjsj,id)values ('%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s','%s')",

    },
    "k3_yjfk":{    #预计付款
        "cgyjfk_sql":"select  gongys_name,guige_xinhao, jiesuan_type , bibie, caigou_date, caigou_code,brand,wuliao_name, number, shui_rate   from  k3_caigoud where sjsj = '%s'",
        # 款到发货 计算应付款, 从采购订单获取
        "cgyjfk_by_kdfh_bymonth": "select  gongys_name, guige_xinhao,  hanshui_unit, jiashui_heji   from   k3_caigoud where sjsj='%s' and  caigou_code !='' ",
        # 计算应付款  月结（采购发票）
        "cgyjfk_with_yuejie_bymonth": "select  ghdw, ggxh,  ddhsdj, jshj  from   k3_cgfp  where sjsj='%s' and  ggxh !=''",
        # 计算应付款 外购入库（货到付款）
        "cgyjfk_with_waigou_bymonth": "select  gongys, guige_xinghao, hanshui_uprice, hanshui_jine   from  k3_waigourk  where sjsj = '%s' and guige_xinghao != ''",
        "cgyjfk_insert_sql":"insert into k3yjfkjh(id, tjmonth, bb, cgrq, ghdw, djbh, pp, wlmc, ggxh, sl, slv, hsdj, jshj)  values('%s', '%s', '%s',"
                            "'%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
    },
}